package net.oschina.git.fsppp.model;

/**
 * 基本响应类，默认status=false，表示请求失败，
 * msg保存请求信息，成功或者失败都有。
 * 如果status=true，请求的又是一个对象，则entity有值
 */
public class SimpleResponse<T> {
    private boolean status;
    private String msg;
    private T entity;

    public SimpleResponse() {
        this.status = false;
        this.msg = "";
    }

    public SimpleResponse(boolean status, String msg) {
        this.status = status;
        this.msg = msg;
    }

    public boolean isStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getEntity() {
        return entity;
    }

    public void setEntity(T entity) {
        this.entity = entity;
    }
}
